#pragma once

#include "Actor.h"
#include "BoundingBox.h"

struct WmoMohd
{
public:
	unsigned int	MaterialCount;
	unsigned int	GroupCount;
	unsigned int	PortalCount;
	unsigned int	LightCount;
	unsigned int	ModelCount;
	unsigned int	DoodadCount;
	unsigned int	DoodadSetCount;
	unsigned char	AmbientColor[4];
	BoundingBox		BoundingBox;
	unsigned int	ID;
};

struct WmoMomt
{
	unsigned int	Flags0;
	unsigned int	SpecularMode;
	unsigned int	BlendMode;
	unsigned int	TextureOffset0;
	unsigned int	Color0;
	unsigned int	Flags1;
	unsigned int	TextureOffset2;
	unsigned int	Color1;
	unsigned int	Flags2;
	unsigned int	Color3;
	unsigned int	Unknown[4];
	unsigned int	Texture0Address;
	unsigned int	Texture1Address;
};

struct WmoMogi
{
	unsigned int	Flags;
	BoundingBox		BoundingBox;
	unsigned int	NameOffset;
};

class Wmo : public Actor
{
public:
	Wmo();
public:
	~Wmo();
public:
	void Load(std::string path);
private:
	WmoMohd		m_oHeader;
	WmoMomt*	m_pMaterials;
	WmoMogi*	m_pGroupInformations;
};

